package com.ipzoe.app.core.exception.enums;

import com.ipzoe.app.core.exception.AbstractBaseExceptionEnum;

/**
 * 异常枚举
 */
public enum AppExceptionEnum implements AbstractBaseExceptionEnum {

    /**
     * token为空
     */
    TOKEN_IS_NULL(401, "token为空"),
    TOKEN_INVALID(401, "token非法"),
    TOKEN_FORZEN(401,"账号已冻结"),
    /**
     * token过期
     */
    TOKEN_EXPIRED(401, "token过期"),

    SERVER_ERROR(500, "服务器异常"),;

    AppExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private Integer code;

    private String message;

    @Override
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
